<!DOCTYPE>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
  <title>第一题不断变大的div</title>
</head>
<body>
  <div style="width: 20px;height: 20px;background: red;"></div>
  <script>
    let div = document.querySelector('div');
    let T = setInterval(run,100)
    let i = 0;
    function run(){
       div.style.width = `${i+20}px`
       div.style.height = `${i+20}px`
       console.log(div.style.width,div.style.height)
       i++;
    }
  </script>
</body>
</html>